﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="@Url.Content("~/Scripts/jquery.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.easyui.min.js")" type="text/javascript"></script>
    <script src="~/Scripts/jquery.tree.js"></script>
    <link href="~/Content/tree/css/tree.css" rel="stylesheet" />
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/themes/blue/css")
    @Scripts.Render("~/bundles/home")
    <script type="text/javascript">
        $(function () {

            var o = {
                showcheck: false,
                url: "/Menu/GetTree",
                onnodeclick: function (item) {
                    var tabTitle = item.text;
                    var url = "../../" + item.value;
                    var icon = item.Icon;
                    if (!item.hasChildren) {
                        addTab(tabTitle, url, icon);
                    } else {
                        $(this).parent().find("img").trigger("click");
                    }
                }
            };
            $.post("/Menu/GetTree", { "id": "0" },
                function (data) {
                    if (data == "0") {
                        window.location = "/Account";
                    }
                    o.data = data;
                    $("#RightTree").treeview(o);
                }, "json");
        });

    </script>
</head>
<body>
    <div id="RightTree" style="background-color: #fff;">
        <div class="panel-loading">加载中...</div>
    </div>
</body>
</html>
